gtk: convert keyvals to unicode before committing to the imcontext
authorMichael Natterer <mitch@lanedo.com>
Fri, 30 Nov 2012 14:06:48 +0000 (15:06 +0100)
committerMichael Natterer <mitch@gimp.org>
Fri, 30 Nov 2012 14:10:51 +0000 (15:10 +0100)
(cherry picked from commit 1eb0d98d734d96a6612e320d32a2aded423d2746)

gtk/gtkimcontextsimple.c

index 1ffb42f60b2ea0e62e379db4b590e921f613a17f..87debf226b9baaaeb4f3c3729aa6b25b79933e0b 100644 (file)
@@ -371,7 +371,7 @@ check_quartz_special_cases (GtkIMContextSimple *context_simple,
                             gint                n_compose)
 {
   GtkIMContextSimplePrivate *priv = context_simple->priv;
-  gunichar value = 0;
+  guint value = 0;
 
   if (n_compose == 2)
     {
@@ -382,7 +382,7 @@ check_quartz_special_cases (GtkIMContextSimple *context_simple,
             {
             case GDK_KEY_dead_doubleacute:
             case GDK_KEY_space:
-              value = '"'; break;
+              value = GDK_KEY_quotedbl; break;
 
             case 'a': value = GDK_KEY_adiaeresis; break;
             case 'A': value = GDK_KEY_Adiaeresis; break;
@@ -395,7 +395,7 @@ check_quartz_special_cases (GtkIMContextSimple *context_simple,
             case 'u': value = GDK_KEY_udiaeresis; break;
             case 'U': value = GDK_KEY_Udiaeresis; break;
             case 'y': value = GDK_KEY_ydiaeresis; break;
-            case 'Y': value = 0x0178; break; /* should be GDK_KEY_Ydiaeresis ?? */
+            case 'Y': value = GDK_KEY_Ydiaeresis; break;
             }
           break;
 
@@ -411,7 +411,8 @@ check_quartz_special_cases (GtkIMContextSimple *context_simple,
 
   if (value > 0)
     {
-      gtk_im_context_simple_commit_char (GTK_IM_CONTEXT (context_simple), value);
+      gtk_im_context_simple_commit_char (GTK_IM_CONTEXT (context_simple),
+                                         gdk_keyval_to_unicode (value));
       priv->compose_buffer[0] = 0;
 
       GTK_NOTE (MISC, g_print ("quartz: U+%04X\n", value));